/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package dominio;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author jair
 */
@Entity
@Table(name = "Notas")
public class Notas implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @NotNull
    @Column(name = "IDNota")
    private Integer id;
    
    @Column(name = "Numchamada")
    private Integer numchamada;

    @Column(name = "Nota1")
    private BigDecimal nota1;
    
    @Column(name = "Falta1")
    private Integer falta1;
    
    @Column(name = "Nota2")
    private BigDecimal nota2;
    
    @Column(name = "Falta2")
    private Integer falta2;
    
    @Column(name = "Nota3")
    private BigDecimal nota3;
    
    @Column(name = "Falta3")
    private Integer falta3;
    
    @Column(name = "Nota4")
    private BigDecimal nota4;
    
    @Column(name = "Falta4")
    private Integer falta4;
    
    @Column(name = "MS1")
    private BigDecimal ms1;
    
    @Column(name = "Rec1")
    private BigDecimal rec1;
    
    @Column(name = "MDS1")
    private BigDecimal mds1;
    
    @Column(name = "MDS2")
    private BigDecimal mds2;
    
    @Column(name = "REC2")
    private BigDecimal rec2;
    
    @Column(name = "MS2")
    private BigDecimal ms2;
    
    @Column(name = "MA")
    private BigDecimal ma;
    
    @Column(name = "PF")
    private BigDecimal pf;
    
    @Column(name = "MFA")
    private BigDecimal mfa;
    @Size(max = 20)
    
    @Column(name = "Situacao")
    private String situacao;
    
    @Column(name = "ch1")
    private Integer ch1;
    
    @Column(name = "ch2")
    private Integer ch2;
    
    @Column(name = "ch3")
    private Integer ch3;
    
    @Column(name = "ch4")
    private Integer ch4;
    
    @Column(name = "rec3")
    private BigDecimal rec3;
    
    @Column(name = "ms3")
    private BigDecimal ms3;
    
    @Column(name = "nota")
    private BigDecimal nota;
    
    @Column(name = "falta")
    private Integer falta;
    
    @Column(name = "ch")
    private Integer ch;
    
    @OneToMany(mappedBy = "notas", fetch = FetchType.LAZY)
    private Set<NotaAvaliacao> notaAvaliacao = new HashSet<>();
    
    @ManyToOne()
    @JoinColumn(name = "idetapa")
    private Etapa etapa;
   
    @ManyToOne()
    @JoinColumn(name = "codmatricula")
    private Matricula matricula;
   
    @ManyToOne()
    @JoinColumn(name = "id_turma_disciplina")
    private TurmaDisciplina turmaDisciplina;

    public Notas() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getNumchamada() {
        return numchamada;
    }

    public void setNumchamada(Integer numchamada) {
        this.numchamada = numchamada;
    }

    public BigDecimal getNota1() {
        return nota1;
    }

    public void setNota1(BigDecimal nota1) {
        this.nota1 = nota1;
    }

    public Integer getFalta1() {
        return falta1;
    }

    public void setFalta1(Integer falta1) {
        this.falta1 = falta1;
    }

    public BigDecimal getNota2() {
        return nota2;
    }

    public void setNota2(BigDecimal nota2) {
        this.nota2 = nota2;
    }

    public Integer getFalta2() {
        return falta2;
    }

    public void setFalta2(Integer falta2) {
        this.falta2 = falta2;
    }

    public BigDecimal getNota3() {
        return nota3;
    }

    public void setNota3(BigDecimal nota3) {
        this.nota3 = nota3;
    }

    public Integer getFalta3() {
        return falta3;
    }

    public void setFalta3(Integer falta3) {
        this.falta3 = falta3;
    }

    public BigDecimal getNota4() {
        return nota4;
    }

    public void setNota4(BigDecimal nota4) {
        this.nota4 = nota4;
    }

    public Integer getFalta4() {
        return falta4;
    }

    public void setFalta4(Integer falta4) {
        this.falta4 = falta4;
    }

    public BigDecimal getMs1() {
        return ms1;
    }

    public void setMs1(BigDecimal ms1) {
        this.ms1 = ms1;
    }

    public BigDecimal getRec1() {
        return rec1;
    }

    public void setRec1(BigDecimal rec1) {
        this.rec1 = rec1;
    }

    public BigDecimal getMds1() {
        return mds1;
    }

    public void setMds1(BigDecimal mds1) {
        this.mds1 = mds1;
    }

    public BigDecimal getMds2() {
        return mds2;
    }

    public void setMds2(BigDecimal mds2) {
        this.mds2 = mds2;
    }

    public BigDecimal getRec2() {
        return rec2;
    }

    public void setRec2(BigDecimal rec2) {
        this.rec2 = rec2;
    }

    public BigDecimal getMs2() {
        return ms2;
    }

    public void setMs2(BigDecimal ms2) {
        this.ms2 = ms2;
    }

    public BigDecimal getMa() {
        return ma;
    }

    public void setMa(BigDecimal ma) {
        this.ma = ma;
    }

    public BigDecimal getPf() {
        return pf;
    }

    public void setPf(BigDecimal pf) {
        this.pf = pf;
    }

    public BigDecimal getMfa() {
        return mfa;
    }

    public void setMfa(BigDecimal mfa) {
        this.mfa = mfa;
    }

    public String getSituacao() {
        return situacao;
    }

    public void setSituacao(String situacao) {
        this.situacao = situacao;
    }

    public Integer getCh1() {
        return ch1;
    }

    public void setCh1(Integer ch1) {
        this.ch1 = ch1;
    }

    public Integer getCh2() {
        return ch2;
    }

    public void setCh2(Integer ch2) {
        this.ch2 = ch2;
    }

    public Integer getCh3() {
        return ch3;
    }

    public void setCh3(Integer ch3) {
        this.ch3 = ch3;
    }

    public Integer getCh4() {
        return ch4;
    }

    public void setCh4(Integer ch4) {
        this.ch4 = ch4;
    }

    public BigDecimal getRec3() {
        return rec3;
    }

    public void setRec3(BigDecimal rec3) {
        this.rec3 = rec3;
    }

    public BigDecimal getMs3() {
        return ms3;
    }

    public void setMs3(BigDecimal ms3) {
        this.ms3 = ms3;
    }

    public BigDecimal getNota() {
        return nota;
    }

    public void setNota(BigDecimal nota) {
        this.nota = nota;
    }

    public Integer getFalta() {
        return falta;
    }

    public void setFalta(Integer falta) {
        this.falta = falta;
    }

    public Integer getCh() {
        return ch;
    }

    public void setCh(Integer ch) {
        this.ch = ch;
    }

    public Set<NotaAvaliacao> getNotaAvaliacao() {
        return notaAvaliacao;
    }

    public void setNotaAvaliacao(Set<NotaAvaliacao> notaAvaliacao) {
        this.notaAvaliacao = notaAvaliacao;
    }

    public Etapa getEtapa() {
        return etapa;
    }

    public void setEtapa(Etapa etapa) {
        this.etapa = etapa;
    }

    public Matricula getMatricula() {
        return matricula;
    }

    public void setMatricula(Matricula matricula) {
        this.matricula = matricula;
    }

    public TurmaDisciplina getTurmaDisciplina() {
        return turmaDisciplina;
    }

    public void setTurmaDisciplina(TurmaDisciplina turmaDisciplina) {
        this.turmaDisciplina = turmaDisciplina;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 53 * hash + Objects.hashCode(this.id);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Notas other = (Notas) obj;
        if (!Objects.equals(this.id, other.id)) {
            return false;
        }
        return true;
    }
    
}
